# -*- coding: utf-8 -*-
#    CoreDesk - a powerfull jabber client
#    Copyright (C) 2009  Jean-Baptiste Gury <jeanbaptiste.gury@gmail.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
import sqlite3
import CoreDeskTools

class DBStoreAccount:
    def setProxy(self,proxy):
        self._proxy = proxy
        
    def createOrUpdate(self,obj):
        print "create or update account object"
        pass
    def delete(self,obj):
        pass
    def get(self,idObj):
        pass

class Account(object):
    """This class represents one jid account
    
    """
    def get_accountId(self):
        """Get the inner id of account."""
        return self._accountId

    def get_jid(self):
        """Get the jid associated with this account"""
        return self._jid
    def set_jid(self,jid): self._jid = jid

    def get_server(self):
        """Get server associated with this account"""
        return self._server
    def set_server(self, server) : self._server = server

    def get_port(self):
        """Get port associated with this account"""
        return self._port
    def set_port(self,port): self._port = port

    def get_resource(self):
        """Get resource associated with this account"""
        return self._resource
    def set_resource(self, resource): self._resource = resource

    def get_avatar(self):
        """Get avatar associated with this account"""
        return self._avatar
    def set_avatar(self,avatar): self._avatar = avatar

    def get_password(self):
        """Get password to connect this account"""
        return self._password
    def set_password(self, password): self._password = password
    
    def __init__(self, myid=None, jid=None,server=None,port=None,resource=None,avatar=None, password=None):
        self._accountId = myid
        self._jid = jid
        self._server = server
        self._port = port
        self._resource = resource
        self._avatar = avatar
        self._password = password
    
    accountId = property(get_accountId)
    jid = property(get_jid, set_jid)
    server = property(get_server, set_server)
    port = property(get_port, set_port)
    resource = property(get_resource, set_resource)
    avatar = property(get_avatar, set_avatar)
    password = property(get_password, set_password)
        

    
    

    
    
        
        
